//
//  HBalanceViewModel.m
//  linktuIOS
//
//  Created by hejunsong on 17/1/23.
//  Copyright © 2017年 tianxie. All rights reserved.
//

#import "HBalanceViewModel.h"
#import "HLiveSendGiftView.h"
@implementation HBalanceViewModel


-(void)BalanceMoneyRefresh:(void(^)(BOOL))refresh;
{
    [[MTWalletApiManager manager] getUserCoinsWithcomplation:^(NSMutableArray<MTCoinModel *> *coins, MTError *boerror) {
       if(boerror == nil)
       {
           self.currentDiamondNumber = coins.firstObject.balance;
            refresh(YES);
       }
    }];
}

-(void)setCurrentDiamondNumber:(NSInteger)currentDiamondNumber
{
    _currentDiamondNumber = currentDiamondNumber;
    if(_currentDiamondNumber < 0)
    {
        _currentDiamondNumber = 0;
    }
    [self.sendGiftView refreshBalance];
    
}
@end
